package com.xuef.ibatis.session.defaults;

import com.xuef.ibatis.executor.Executor;
import com.xuef.ibatis.session.Configuration;
import com.xuef.ibatis.session.SqlSession;

import java.util.List;

/**
 * Created by xuefengDong: moveb
 * On 2019/4/25- 20:25
 */
public class DefaultSqlSession implements SqlSession {
    private final Configuration configuration;
    //sqlSession 将sql的执行委托给 executor
    private final Executor executor;

    //private final boolean autoCommit;
    //private boolean dirty;
    //private List<Cursor<?>> cursorList;

    public DefaultSqlSession(Configuration configuration, Executor executor) {
        this.configuration = configuration;
        this.executor = executor;
    }
    public <T> T selectOne(String statement) {
        return null;
    }

    public <T> T selectOne(String statement, Object parameter) {
        return null;
    }

    public <E> List<E> selectList(String statement) {
        return null;
    }

    public <E> List<E> selectList(String statement, Object parameter) {
        return null;
    }

    //TODO 带 ResultHandler 的查询

    public <T> T getMapper(Class<T> type) {

        return null;
    }

    public Configuration getConfiguration() {
        return configuration;
    }
}
